#include <stdio.h>
#include <cmath>

int main() {
    int h, n;
    scanf("%d %d", &h, &n);
    if (n == 1) {
        printf("%.2f %.2f\n", (float)h, h/2.0);
    } else  {
        float accu = h;
        float hv   = h / pow(2, n);
        for (int i = 2; i <= n; i++) {
            accu += 2 * h / pow(2, i-1);
        }
        printf("%.10f %.10f\n", accu, hv);
    }
    return 0;
}